//  示例数据结构

/**
 * 消息体格式
 */

let contentList = [
    {
        type: "system",
        content: "2023-09-15 10:00:00 用户加入聊天",
        time: '',
    },
    {
        type: "history",
        content: "历史消息",
    },
    {
        type: "message",
        isSelf: false,
        username: "好友昵称",
        avatar: "avatar-url",
        content: "你好呀！",
        time: 1694826000000,
    },
    {
        type: "message",
        isSelf: true,
        username: "我",
        avatar: "my-avatar-url",
        content: "你好！最近怎么样？",
        time: 1694826030000,
    }]

     /**
     * 处理系统消息
     */
     doSysmessage(content,time){
        let message = {
          type: "system",
          content: "用户：" + content + "加入群聊....",
          time: time,
        };
        this.contentList.push(message);
      }

      {
        "from": "来源ID",
        "to": "目标ID",
        "cmd":"命令码(11)int类型",
        "createTime": "消息创建时间long类型",
        "msgType": "消息类型int类型(0:text、1:image、2:voice、3:vedio、4:music、5:news)",
        "chatType":"聊天类型int类型(0:未知,1:公聊,2:私聊)",
        "groupId":"群组id仅在chatType为(1)时需要,String类型",
        "content": "内容",
        "extras" : "扩展字段,JSON对象格式如：{'扩展字段名称':'扩展字段value'}"
     }  